.counting
  = field_set do
    = f.input :name
    = f.input :seeding_density_unit, collection: Nomen::Unit.where(dimension: :surface_area_density).selection, include_blank: false
    = f.input :sampling_length_unit, collection: Nomen::Unit.where(dimension: :distance).selection, include_blank: false
    = f.input :germination_percentage

  = field_set PlantDensityAbacus.human_attribute_name(:items) do
    .items
      %table
        %thead
          %tr
            %th= PlantDensityAbacusItem.human_attribute_name(:seeding_density_value)
            %th= PlantDensityAbacusItem.human_attribute_name(:plants_count)
            %th
        %tbody#items
          = f.simple_fields_for :items, f.object.items do |item|
            = render 'backend/plant_density_abaci/item_fields', f: item
        %tfoot
          %tr
            %td{ colspan: 2 }= link_to_add_association :add_item.tl, f, :items, partial: 'backend/plant_density_abaci/item_fields', data: { association_insertion_node: '#items', association_insertion_method: :append }, class: "btn primary"
